/*
 * Main.java
 */
package helloworld;

/**
 *
 * @author Kirill Sorokin
 */
public class Clibrary {
    
    static {
        //System.loadLibrary("libHelloWorld");
        System.load("C:\\Users\\PiotrGl\\Documents\\NetBeansProjects\\HelloWorld\\dist\\Debug\\MinGW_64-Windows\\libHelloWorld.dll");
        //System.load("C:\\Users\\PiotrGl\\Documents\\NetBeansProjects\\beginning-jni-win-src\\HelloWorldNative\\dist\\HelloWorldNative.dll");
       
        //C:\\Users\\PiotrGl\\Documents\\NetBeansProjects\\beginning-jni-win-src\\HelloWorldNative\\nbproject
        //C:\Users\PiotrGl\Documents\NetBeansProjects\beginning-jni-win-src\HelloWorldNative\dist
    }
    private native int[] nativePrint(int liczba, int[] liczby);
   
    public static void main(String[] args) {
        int ret[];
        int a[] = {4,6,7,8,10,45,67,98};
        
        ret = new Clibrary().nativePrint(5, a);
        int i = 0, len = ret.length;
        
        while (i<len){
            System.out.print(i+": "+ret[i]+"\n");
            i++;
        }
        System.out.println("koniec");
        
    }
    
    

    
    
}
